#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "gamemodel.h"


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    GameModel* game = NULL;//游戏指针
       GameType game_type = AI;//存储的游戏类型
       int clickPosRow,clickPosCol;
       bool selectPos;
       void paintEvent(QPaintEvent* event);
       void initGame();
       void initAIGame();
       void mouseMoveEvent(QMouseEvent* event);
       void mouseReleaseEvent(QMouseEvent* event);
       void chessOneByPerson();
   private slots:
       void chessOneByAI();
};
#endif // MAINWINDOW_H
